<template>
  <VPage>
    <VTable ref="tableRef" v-bind="tableOptins" />
  </VPage>
</template>
<script setup lang="jsx">
import { salesForecastAccuracyList } from "@/api/report"
const tableRef = ref()
//获取下拉数据
onMounted(() => {})
// 列表配置
// 出货需求满足率

const tableOptins = reactive({
  formConfig: { data: {} },
  rowConfig: { height: 100 },
  columns: [
    {
      title: "图片",
      width: 120,
      slots: {
        default: ({ row }) => <el-image class="image w-[80px] h-[80px]" src={row?.sku_attr_img} />,
      },
    },
    { field: "site_code", title: "国家", minWidth: 100 },
    { field: "asin", title: "ASIN", minWidth: 100 },
    { field: "sku", title: "SKU", minWidth: 100 },
    { field: "custom_sku", title: "自定义SKU", minWidth: 100 },
    { field: "sku_title", title: "产品名称", minWidth: 160 },
    { field: "start_time", title: "预测时间", minWidth: 170 },
    { field: "system_forecast_sales", title: "系统预测销量", minWidth: 120 },
    { field: "operation_forecast_sales", title: "运营预测销量", minWidth: 120 },
    { field: "start_time", title: "开始时间", minWidth: 170 },
    { field: "end_time", title: "结束时间", minWidth: 170 },
    { field: "actual_sales", title: "实际销量", minWidth: 120 },
    { field: "system_accuracy", title: "系统预测准确率", minWidth: 120 },
    { field: "operation_accuracy", title: "运营预测准确率", minWidth: 120 },
    { field: "planner_user_text", title: "计划人员", minWidth: 120 },
    { field: "operator_user_text", title: "运营人员", minWidth: 120 },
    { field: "purchaser_user_text", title: "采购人员", minWidth: 120 },
    { field: "updated_at", title: "更新时间", minWidth: 170 },
  ],
  proxyConfig: {
    ajax: {
      query: ({ page, form }) => {
        let params = { page: page.pageNum, page_num: page.pageSize }
        return salesForecastAccuracyList(params)
      },
    },
  },
})
</script>
<style lang="scss" scoped></style>
